package com.hx.shape;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PointF;

public abstract class Shape {
	protected PointF sPnt;
	protected PointF ePnt;
	public Shape(){
		sPnt = new PointF(0,0);
		ePnt = new PointF(0,0);
	}
	public Shape(float x,float y){
		this();
		this.setInitPoint(x, y);
	}
	public void setStartPoint(float x,float y){
		sPnt.x = x;
		sPnt.y = y;
	}
	public void setEndPoint(float x,float y){
		ePnt.x = x;
		ePnt.y = y;
	}
	public void setInitPoint(float x,float y){
		sPnt.x = x;
		sPnt.y = y;
		ePnt.x = x;
		ePnt.y = y;
	}
	public String toString(){
		return "Shape on ("+ sPnt.x + ","+ sPnt.y + "),(" + ePnt.x + "," + ePnt.y + ")";
	}
	public abstract void paint(Canvas cv,Paint pt);
}
